<? include ("../init.php") ?>
<? include ("../header.php") ?>
<? include ("../menu.php") ?>
<? include ("submenu.php") ?>

<div id = "body">

<h1><?_l('user')?></h1>
<div class = "clear"></div>

<table cellpadding = "0" cellspacing = "0" border = "0" class ="list">
  <th scope="col"><?_l('username')?></th>
  <th scope="col"><?_l('password')?></th>
  <th scope="col"><?_l('name')?></th>
  <th scope="col"><?_l('gender')?></th>
  <th scope="col"><?_l('birthday')?></th>
  <th scope="col"><?_l('job')?></th>
  <th scope="col"><?_l('address')?></th>
  <th scope="col"><?_l('province')?></th>
  <th scope="col"><?_l('country')?></th>
  <th scope="col"><?_l('zipcode')?></th>
  <th scope="col"><?_l('groupuser')?></th>
  
  <th scope="col"><?_l('edit')?></th>
  <th scope="col"><?_l('delete')?></th>

<?
  $rss = $db->query("SELECT * FROM user");
  while ($line = $db->fetchNextObject($rss)){
?>
  <tr>
    <td><?=$line->username?></td>
    <td><?=$line->password?></td>
    <td><?=$line->name?></td>
    <td><?=$line->gender?></td>
    <td><?=get_thai_date($line->birthday,1)?></td>
    <td><?=$line->job?></td>
    <td><?=$line->address?></td>
    <td><?=$line->province?></td>
    <td><?=$line->country?></td>
    <td><?=$line->zipcode?></td>
    <td><?=$line->groupuser?></td>
    <td><a href = "edit.php?uid=<?=$line->uid?>" class = "btn"><?_l('edit')?></a></td>
    <td><a href = "del.php?uid=<?=$line->uid?>" class = "btn"><?_l('delete')?></a></td>
  </tr>
<?
  }
?>
</table>

</div>

<style>
#event{
  margin:0 0 0 20px;
}
</style>

<? include "../footer.php" ?>